package com.example.dicos.service.impl;

import com.example.dicos.entity.Test;
import com.example.dicos.entity.dot.TestDto;
import com.example.dicos.entity.dot.UpdateDto;
import com.example.dicos.entity.dot.batchDelete;
import com.example.dicos.mapper.TestMapper;
import com.example.dicos.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TestServiceImpl implements TestService {
    @Autowired
    private TestMapper testMapper;

    @Override
    public Integer addTest(TestDto test) {
        return testMapper.addTest(test.getTestList());
    }

    @Override
    public Integer batchDelete(batchDelete batchDelete) {
        return testMapper.batchDelete(batchDelete.getId());
    }

    @Override
    public Integer updates(UpdateDto test) {
        return testMapper.updates(test.getId(),test.getTestList());
    }

    @Override
    public Integer updatesTwo(TestDto test) {
        return testMapper.updatesTwo(test.getTestList());
    }
}
